package com.cx.controller;

import com.cx.entity.CartoonCharacter;
import com.cx.service.CartoonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @ClassName: IntegrateController
 * @Description:
 * @Author: cx
 * @Date: 2022/10/23 16:48
 **/
@Controller
public class IntegrateController {

//    直接调用接口 dci

@Autowired
    private CartoonService service;

    //返回字符串
    @RequestMapping( value = "/findAll")
    public String test02() {
        System.out.println("控制层进来了");
        List<CartoonCharacter> allCartoonCharacter = service.findAllCartoonCharacter();
        System.out.println(allCartoonCharacter);
        return "success";
    }
}
